import request from '@/utils/request'
import {SysLogininforDomain} from '@/type.d/monitor/logininfor';

// 查询系统访问记录列表
export function listLogininfor(query: SysLogininforDomain) {
  return request('/monitor/logininfor/list',{
    method: 'get',
    params: query
  })
}

// 查询系统访问记录详细
export function getLogininfor(infoId: string) {
  return request('/monitor/logininfor/' + infoId,{
    method: 'get'
  })
}

// 新增系统访问记录
export function addLogininfor(data: SysLogininforDomain) {
  return request('/monitor/logininfor',{
    method: 'post',
    data: data
  })
}

// 修改系统访问记录
export function updateLogininfor(data: SysLogininforDomain) {
  return request('/monitor/logininfor',{
    method: 'put',
    data: data
  })
}

// 删除系统访问记录
export function delLogininfor(infoId: string) {
  return request('/monitor/logininfor/' + infoId,{
    method: 'delete'
  })
}


// 清空系统访问记录
export function cleanLogininlog() {
  return request({
    url: '/monitor/logininfor/clean',
    method: 'delete'
  })
}
